package crp.core.workflow.domain.services;

import crp.core.workflow.domain.models.WorkflowModelEntity;
import crp.core.workflow.domain.repositories.WorkflowModelRepository;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import java.util.Collection;
import java.util.Set;
import java.util.stream.Stream;

@ApplicationScoped
public class WorkflowModelSearcher {
    private final WorkflowModelRepository repository;
    @Inject
    public WorkflowModelSearcher(WorkflowModelRepository repository) {
        this.repository = repository;
    }

    public Stream<WorkflowModelEntity> findByIds(Collection<String> ids) {
        return repository.findByIds(ids);
    }
}
